Skip to content

Conversation

@jonathan-up
Copy link
Contributor

@jonathan-up jonathan-up commented Jul 27, 2024

Tested✔

#include <amxmodx>
#include <reapi>

public plugin_init()
{
    register_clcmd("say .fnp", "cmd_fnp");

    RegisterHookChain(RG_CBasePlayer_Observer_FindNextPlayer, "RG_CBasePlayer_Observer_FindNextPlayer_Pre", false);
}

public RG_CBasePlayer_Observer_FindNextPlayer_Pre(const this, bool:bReverse, name[])
{
    client_print(this, print_chat, "FindNextPlayer: bReverse(%d), name(%s)", bReverse, name);
}

public cmd_fnp(const index)
{
    if (!(get_member(index, m_afPhysicsFlags) & PFLAG_OBSERVER))
    {
        client_print(index, print_chat, "YOUR ARE NOT A OBSERVER");
        return PLUGIN_HANDLED;
    }

    client_print(index, print_chat, "YOU DID");
    rg_observer_find_next_player(index, true, "");
    return PLUGIN_HANDLED;
}

@s1lentq s1lentq merged commit c2d3c3c into rehlds:master Mar 27, 2025
@jonathan-up jonathan-up deleted the native-obs-find-next-player branch April 7, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants